<template>
  <div style="padding: 10px; height: 1000px">
    <a-breadcrumb
      style="font-size: 18px; font-weight: bold; margin-bottom: 20px"
    >
      <a-breadcrumb-item>系统设置</a-breadcrumb-item>
    </a-breadcrumb>
    <div class="container">
      <a-typography-title :level="5"
        >为新用户赠送体验金5元 &nbsp;
        <a-switch v-model:checked="checkedMoney" @click="giveMoneyState()"
      /></a-typography-title>
    </div>
    <div class="container">
      <a-typography-title :level="5"
        >开启能源网安全校核 &nbsp; <a-switch v-model:checked="checked2"
      /></a-typography-title>
    </div>
  </div>
</template>
<script>
// 引入echarts
import { onMounted } from "vue";
import { reactive, ref } from "vue";
import moment from "moment";
import { useRouter } from "vue-router";
import { get, del, post, getBlob, tip, removeLocalToken, ddo } from "@/common";
import {
  UsergroupAddOutlined,
  PartitionOutlined,
  HistoryOutlined,
} from "@ant-design/icons-vue";

export default {
  components: {
    UsergroupAddOutlined,
    PartitionOutlined,
    HistoryOutlined,
  },
  setup() {
    const checkedMoney = ref(true);
    const checked2 = ref(false);
    const getState=()=>{
      get("/manager/system/getState").then((res) => {
        checkedMoney.value=res.data.money_state;
      });
    }
    getState();
    const giveMoneyState = () => {
        post("/manager/system/setMoneyState").then((res) => {
      });
    };
    return {
      checkedMoney,
      checked2,
      giveMoneyState,
      getState,
    };
  },
};
</script>
<style>
.div-inline {
  display: inline;
}
.container {
  margin: 50px 0px;
}
</style>